let appScroll: any;
const useAppScroll = () => {
  if (!appScroll) {
    appScroll = document.querySelector("#appScroll");
  }

  const scrollTo = (
    top: number,
    left: number = 0,
    behavior?: "smooth" | "auto"
  ) => appScroll.scrollTo(top, left, behavior);

  return {
    scrollTo,
  };
};

export default useAppScroll;
